package org.example.datascreen.repository;

import org.example.datascreen.eneity.SoilConductivityData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SoilConductivityDataRespository extends JpaRepository<SoilConductivityData, Long> {

    @Query("SELECT s FROM SoilConductivityData s ORDER BY s.createdTime DESC")
    List<SoilConductivityData> findTop7ByOrderByCreatedTimeDesc();


}
